package com.ruoyi.project.wechatprogram.orderdescription.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.wechatprogram.orderdescription.mapper.WxOrderDescriptionMapper;
import com.ruoyi.project.wechatprogram.orderdescription.domain.WxOrderDescription;
import com.ruoyi.project.wechatprogram.orderdescription.service.IWxOrderDescriptionService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 餐品订单详情Service业务层处理
 * 
 * @author sxchen
 * @date 2020-04-21
 */
@Service
public class WxOrderDescriptionServiceImpl implements IWxOrderDescriptionService 
{
    @Autowired
    private WxOrderDescriptionMapper wxOrderDescriptionMapper;

    /**
     * 查询餐品订单详情
     * 
     * @param id 餐品订单详情ID
     * @return 餐品订单详情
     */
    @Override
    public WxOrderDescription selectWxOrderDescriptionById(Integer id)
    {
        return wxOrderDescriptionMapper.selectWxOrderDescriptionById(id);
    }

    /**
     * 查询餐品订单详情列表
     * 
     * @param wxOrderDescription 餐品订单详情
     * @return 餐品订单详情
     */
    @Override
    public List<WxOrderDescription> selectWxOrderDescriptionList(WxOrderDescription wxOrderDescription)
    {
        return wxOrderDescriptionMapper.selectWxOrderDescriptionList(wxOrderDescription);
    }

    /**
     * 新增餐品订单详情
     * 
     * @param wxOrderDescription 餐品订单详情
     * @return 结果
     */
    @Override
    public int insertWxOrderDescription(WxOrderDescription wxOrderDescription)
    {
        return wxOrderDescriptionMapper.insertWxOrderDescription(wxOrderDescription);
    }

    /**
     * 修改餐品订单详情
     * 
     * @param wxOrderDescription 餐品订单详情
     * @return 结果
     */
    @Override
    public int updateWxOrderDescription(WxOrderDescription wxOrderDescription)
    {
        return wxOrderDescriptionMapper.updateWxOrderDescription(wxOrderDescription);
    }

    /**
     * 删除餐品订单详情对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteWxOrderDescriptionByIds(String ids)
    {
        return wxOrderDescriptionMapper.deleteWxOrderDescriptionByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除餐品订单详情信息
     * 
     * @param id 餐品订单详情ID
     * @return 结果
     */
    @Override
    public int deleteWxOrderDescriptionById(Integer id)
    {
        return wxOrderDescriptionMapper.deleteWxOrderDescriptionById(id);
    }
}
